<?php
/**
 * @Author: Ron Chen
 * @Date:   2017-03-11 21:45:57
 * @Last Modified by:   Ron Chen
 * @Last Modified time: 2017-07-11 23:14:31
 */
namespace frontend\controllers;

use Yii;
use yii\web\Response;
use yii\helpers\Html;
use yii\helpers\Json;
use yii\helpers\Url;

/**
 * Base controller
 * 
 */
abstract class BaseController extends \common\bases\BaseController
{
	public $enableCsrfValidation = false;

	public function init()
	{
		parent::init();
		if ($this->request->get('callback')) {
			$this->getResponse()->format = Response::FORMAT_JSONP;
		} else {
			$this->getResponse()->format = Response::FORMAT_JSON;
		}
	}
}